#ifndef __MOTOR_H__
#define __MOTOR_H_

#define MOTOR_PID_T 3

/* duty constrain */
#define MOTOR_DUTY_MIN 0 
#define MOTOR_DUTY_MAX 7000

/* differential duty constrain */
#define MOTOR_DUTY_DIFF_MIN 0
#define MOTOR_DUTY_DIFF_MAX 3000

/* expected speed */
#define MOTOR_SET_MIN 0
#define MOTOR_SET_MAX 7000

/* standard speed */
#define Q 5000
#define MOTOR_DUTY_STRAIGHT 2000
#define MOTOR_DUTY_STEERING 2000

/* slow down duty constrain */
#define MOTOR_ANTI_MIN 0
#define MOTOR_ANTI_MAX 3000

/* motor control type */
/* 0: open loop direct
 * 1: bang bang control
 * 2: pid control
 */
#define MOTOR_CONTROL 2

void motor_control(void);

#endif /* __MOTOR_H__ */
